# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=glibd
pkgver=2.4.3
pkgrel=0
pkgdesc="D bindings for the GLib C Utility Library"
url="https://github.com/gtkd-developers/GlibD"
arch="x86_64 aarch64" # ldc
license="GPL-3.0-or-later"
makedepends="meson gobject-introspection-dev glib-dev ldc gir-to-d"
subpackages="$pkgname-dev $pkgname-dbg"
source="https://github.com/gtkd-developers/GlibD/archive/v$pkgver/glibd-$pkgver.tar.gz
	link-gthread.patch
	"
builddir="$srcdir/GlibD-$pkgver"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
7ceb415cad9aa3ea325d561932586b730af7ce123d4f1e69339eb2f007774abfa126d783af898ef7f8c17bde0f337383ba1630fd039f9a22a3c34a98ac8dd539  glibd-2.4.3.tar.gz
3fb514e6a7afcf596a09e80defbf51d43995624fcaac38b75e555462740ee1d9688e02680c1194cd03e77f5b1c2aae6aad97527d66f6971188f3074ae6826f22  link-gthread.patch
"
